python IndexError that I cannot resolve with dictionaries

visit shbcf.ru